package com.example.demo.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerException;

public class HelloJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        Object tv1 = context.getTrigger().getJobDataMap().get("1");
        Object tv2 = context.getTrigger().getJobDataMap().get("2");
        Object tv3 = context.getJobDetail().getJobDataMap().get("3");
        Object tv4 = context.getJobDetail().getJobDataMap().get("4");

        System.out.println(tv1);
        try {
            Object skey = context.getScheduler().getContext().get("skey");
            System.out.println(skey);
        } catch (SchedulerException e) {
            throw new RuntimeException(e);
        }
    }
}
